package com.fc.v2.model.auto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.hutool.core.util.StrUtil;

/**
 * 发型师信息管理 HairstylistExample
 * @author fuce_自动生成
 * @date 2021-04-22 14:39:53
 */
public class HairstylistExample {

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public HairstylistExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
        
				
        public Criteria andHIdIsNull() {
            addCriterion("h_id is null");
            return (Criteria) this;
        }

        public Criteria andHIdIsNotNull() {
            addCriterion("h_id is not null");
            return (Criteria) this;
        }

        public Criteria andHIdEqualTo(String value) {
            addCriterion("h_id =", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdNotEqualTo(String value) {
            addCriterion("h_id <>", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdGreaterThan(String value) {
            addCriterion("h_id >", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdGreaterThanOrEqualTo(String value) {
            addCriterion("h_id >=", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdLessThan(String value) {
            addCriterion("h_id <", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdLessThanOrEqualTo(String value) {
            addCriterion("h_id <=", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdLike(String value) {
            addCriterion("h_id like", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdNotLike(String value) {
            addCriterion("h_id not like", value, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdIn(List<String> values) {
            addCriterion("h_id in", values, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdNotIn(List<String> values) {
            addCriterion("h_id not in", values, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdBetween(String value1, String value2) {
            addCriterion("h_id between", value1, value2, "hId");
            return (Criteria) this;
        }

        public Criteria andHIdNotBetween(String value1, String value2) {
            addCriterion("h_id not between", value1, value2, "hId");
            return (Criteria) this;
        }
        
				
        public Criteria andHNameIsNull() {
            addCriterion("h_name is null");
            return (Criteria) this;
        }

        public Criteria andHNameIsNotNull() {
            addCriterion("h_name is not null");
            return (Criteria) this;
        }

        public Criteria andHNameEqualTo(String value) {
            addCriterion("h_name =", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameNotEqualTo(String value) {
            addCriterion("h_name <>", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameGreaterThan(String value) {
            addCriterion("h_name >", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameGreaterThanOrEqualTo(String value) {
            addCriterion("h_name >=", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameLessThan(String value) {
            addCriterion("h_name <", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameLessThanOrEqualTo(String value) {
            addCriterion("h_name <=", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameLike(String value) {
            addCriterion("h_name like", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameNotLike(String value) {
            addCriterion("h_name not like", value, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameIn(List<String> values) {
            addCriterion("h_name in", values, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameNotIn(List<String> values) {
            addCriterion("h_name not in", values, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameBetween(String value1, String value2) {
            addCriterion("h_name between", value1, value2, "hName");
            return (Criteria) this;
        }

        public Criteria andHNameNotBetween(String value1, String value2) {
            addCriterion("h_name not between", value1, value2, "hName");
            return (Criteria) this;
        }
        
				
        public Criteria andHTelIsNull() {
            addCriterion("h_tel is null");
            return (Criteria) this;
        }

        public Criteria andHTelIsNotNull() {
            addCriterion("h_tel is not null");
            return (Criteria) this;
        }

        public Criteria andHTelEqualTo(String value) {
            addCriterion("h_tel =", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelNotEqualTo(String value) {
            addCriterion("h_tel <>", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelGreaterThan(String value) {
            addCriterion("h_tel >", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelGreaterThanOrEqualTo(String value) {
            addCriterion("h_tel >=", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelLessThan(String value) {
            addCriterion("h_tel <", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelLessThanOrEqualTo(String value) {
            addCriterion("h_tel <=", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelLike(String value) {
            addCriterion("h_tel like", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelNotLike(String value) {
            addCriterion("h_tel not like", value, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelIn(List<String> values) {
            addCriterion("h_tel in", values, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelNotIn(List<String> values) {
            addCriterion("h_tel not in", values, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelBetween(String value1, String value2) {
            addCriterion("h_tel between", value1, value2, "hTel");
            return (Criteria) this;
        }

        public Criteria andHTelNotBetween(String value1, String value2) {
            addCriterion("h_tel not between", value1, value2, "hTel");
            return (Criteria) this;
        }
        
				
        public Criteria andHCardnumIsNull() {
            addCriterion("h_cardnum is null");
            return (Criteria) this;
        }

        public Criteria andHCardnumIsNotNull() {
            addCriterion("h_cardnum is not null");
            return (Criteria) this;
        }

        public Criteria andHCardnumEqualTo(String value) {
            addCriterion("h_cardnum =", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumNotEqualTo(String value) {
            addCriterion("h_cardnum <>", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumGreaterThan(String value) {
            addCriterion("h_cardnum >", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumGreaterThanOrEqualTo(String value) {
            addCriterion("h_cardnum >=", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumLessThan(String value) {
            addCriterion("h_cardnum <", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumLessThanOrEqualTo(String value) {
            addCriterion("h_cardnum <=", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumLike(String value) {
            addCriterion("h_cardnum like", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumNotLike(String value) {
            addCriterion("h_cardnum not like", value, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumIn(List<String> values) {
            addCriterion("h_cardnum in", values, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumNotIn(List<String> values) {
            addCriterion("h_cardnum not in", values, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumBetween(String value1, String value2) {
            addCriterion("h_cardnum between", value1, value2, "hCardnum");
            return (Criteria) this;
        }

        public Criteria andHCardnumNotBetween(String value1, String value2) {
            addCriterion("h_cardnum not between", value1, value2, "hCardnum");
            return (Criteria) this;
        }
        
				
        public Criteria andHIntimeIsNull() {
            addCriterion("h_intime is null");
            return (Criteria) this;
        }

        public Criteria andHIntimeIsNotNull() {
            addCriterion("h_intime is not null");
            return (Criteria) this;
        }

        public Criteria andHIntimeEqualTo(String value) {
            addCriterion("h_intime =", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeNotEqualTo(String value) {
            addCriterion("h_intime <>", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeGreaterThan(String value) {
            addCriterion("h_intime >", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeGreaterThanOrEqualTo(String value) {
            addCriterion("h_intime >=", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeLessThan(String value) {
            addCriterion("h_intime <", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeLessThanOrEqualTo(String value) {
            addCriterion("h_intime <=", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeLike(String value) {
            addCriterion("h_intime like", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeNotLike(String value) {
            addCriterion("h_intime not like", value, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeIn(List<String> values) {
            addCriterion("h_intime in", values, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeNotIn(List<String> values) {
            addCriterion("h_intime not in", values, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeBetween(String value1, String value2) {
            addCriterion("h_intime between", value1, value2, "hIntime");
            return (Criteria) this;
        }

        public Criteria andHIntimeNotBetween(String value1, String value2) {
            addCriterion("h_intime not between", value1, value2, "hIntime");
            return (Criteria) this;
        }
        
				
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(Integer value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(Integer value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }
        
				
        public Criteria andHPositionIsNull() {
            addCriterion("h_position is null");
            return (Criteria) this;
        }

        public Criteria andHPositionIsNotNull() {
            addCriterion("h_position is not null");
            return (Criteria) this;
        }

        public Criteria andHPositionEqualTo(String value) {
            addCriterion("h_position =", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionNotEqualTo(String value) {
            addCriterion("h_position <>", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionGreaterThan(String value) {
            addCriterion("h_position >", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionGreaterThanOrEqualTo(String value) {
            addCriterion("h_position >=", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionLessThan(String value) {
            addCriterion("h_position <", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionLessThanOrEqualTo(String value) {
            addCriterion("h_position <=", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionLike(String value) {
            addCriterion("h_position like", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionNotLike(String value) {
            addCriterion("h_position not like", value, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionIn(List<String> values) {
            addCriterion("h_position in", values, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionNotIn(List<String> values) {
            addCriterion("h_position not in", values, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionBetween(String value1, String value2) {
            addCriterion("h_position between", value1, value2, "hPosition");
            return (Criteria) this;
        }

        public Criteria andHPositionNotBetween(String value1, String value2) {
            addCriterion("h_position not between", value1, value2, "hPosition");
            return (Criteria) this;
        }
        
			
		 public Criteria andLikeQuery(Hairstylist record) {
		 	List<String> list= new ArrayList<String>();
		 	List<String> list2= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
			if(record.getHId()!=null&&StrUtil.isNotEmpty(record.getHId().toString())) {
    			 list.add("ifnull(h_id,'')");
    		}
			if(record.getHName()!=null&&StrUtil.isNotEmpty(record.getHName().toString())) {
    			 list.add("ifnull(h_name,'')");
    		}
			if(record.getHTel()!=null&&StrUtil.isNotEmpty(record.getHTel().toString())) {
    			 list.add("ifnull(h_tel,'')");
    		}
			if(record.getHCardnum()!=null&&StrUtil.isNotEmpty(record.getHCardnum().toString())) {
    			 list.add("ifnull(h_cardnum,'')");
    		}
			if(record.getHIntime()!=null&&StrUtil.isNotEmpty(record.getHIntime().toString())) {
    			 list.add("ifnull(h_intime,'')");
    		}
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			 list.add("ifnull(id,'')");
    		}
			if(record.getHPosition()!=null&&StrUtil.isNotEmpty(record.getHPosition().toString())) {
    			 list.add("ifnull(h_position,'')");
    		}
			if(record.getHId()!=null&&StrUtil.isNotEmpty(record.getHId().toString())) {
    			list2.add("'%"+record.getHId()+"%'");
    		}
			if(record.getHName()!=null&&StrUtil.isNotEmpty(record.getHName().toString())) {
    			list2.add("'%"+record.getHName()+"%'");
    		}
			if(record.getHTel()!=null&&StrUtil.isNotEmpty(record.getHTel().toString())) {
    			list2.add("'%"+record.getHTel()+"%'");
    		}
			if(record.getHCardnum()!=null&&StrUtil.isNotEmpty(record.getHCardnum().toString())) {
    			list2.add("'%"+record.getHCardnum()+"%'");
    		}
			if(record.getHIntime()!=null&&StrUtil.isNotEmpty(record.getHIntime().toString())) {
    			list2.add("'%"+record.getHIntime()+"%'");
    		}
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			list2.add("'%"+record.getId()+"%'");
    		}
			if(record.getHPosition()!=null&&StrUtil.isNotEmpty(record.getHPosition().toString())) {
    			list2.add("'%"+record.getHPosition()+"%'");
    		}
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append(" like CONCAT(");
        	buffer.append(StrUtil.join(",",list2));
        	buffer.append(")");
        	if(!" CONCAT() like CONCAT()".equals(buffer.toString())) {
        		addCriterion(buffer.toString());
        	}
        	return (Criteria) this;
        }
        
        public Criteria andLikeQuery2(String searchText) {
		 	List<String> list= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
    		list.add("ifnull(h_id,'')");
    		list.add("ifnull(h_name,'')");
    		list.add("ifnull(h_tel,'')");
    		list.add("ifnull(h_cardnum,'')");
    		list.add("ifnull(h_intime,'')");
    		list.add("ifnull(id,'')");
    		list.add("ifnull(h_position,'')");
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append("like '%");
        	buffer.append(searchText);
        	buffer.append("%'");
        	addCriterion(buffer.toString());
        	return (Criteria) this;
        }
        
}
	
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}